package com.docking.heylo.web.controller;

import com.docking.heylo.service.IUserService;
import com.docking.heylo.web.dto.UserDto;
import com.docking.heylo.web.utils.ResultUtil;
import com.docking.heylo.web.vo.BaseVo;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/users")
public class UserController {

    @Autowired
    private IUserService userService;

    /****
     * 用户列表
     *
     * @returnx
     */
    @RequestMapping("/list")
    public BaseVo list(@RequestBody UserDto userDto){
        PageInfo<Map<String, Object>> userList = userService.userList(userDto);
        return ResultUtil.success("成功", userList);
    }













}
